var interfaceApp = function(){
    var zh = '5000000884';
	function loadWddj(){
		manager.getYhxx(function(data){//获取账号信息
			if(data&&data.zh){
				zh = data.zh;
				$('.grzx-desc>label').text(data.hync);
			}
			var url =  Constants.csUrlPath + 'czz/getCzzLv?zh='+zh;
			$.ajax({
				type : "get",
				url : url ,
				success : function(data) {
					$('.top-level').text(data.curLevel);
					$('.curLevel').text(data.curLevel);
					$('.nextLevel').text(data.nextLevel);
					$('.extraCzz').text(data.diff);
					var staicValue = parseInt(data.czzxx,0);//当前等级
					var nextValue  = parseInt(data.czzdsx,0);//下一等级
					var currValue  = parseInt(data.czz,0);//当前成长值
					var totalValue = nextValue - staicValue;
					var currBarValue = currValue - staicValue;
					var width = currBarValue/totalValue*100;
					if(data.diff == 0){
						width = 100;//满级
					}
					   setTimeout(function(){
							  var bar = document.getElementById("bar");
								$('#bar').stop().animate({width:width+'%'},'normal') ;
					   },300); 
				}
			});
		})
	}
	return {
		init: function(){
			loadWddj();
		}
	}
}()
$(document).ready(interfaceApp.init);
